package pack1022;

import java.time.DayOfWeek;
import java.time.LocalDateTime;

public class DemoD {
    private static void a() {
        LocalDateTime now = LocalDateTime.now();
        LocalDateTime datetime1 = LocalDateTime.of(198, 1, 3, 2, 3, 4);
        LocalDateTime datetime2 = LocalDateTime.of(888, 3, 4, 5, 6, 5);
        System.out.println(now);
        System.out.println(datetime1);
        System.out.println(datetime2);
    }
    private static void b(){
        LocalDateTime now=LocalDateTime.now();
        int years= now.getYear();
        int nowMonthValue = now.getMonthValue();
        int dayOfMonth = now.getDayOfMonth();
        int hour = now.getHour();
        int minute = now.getMinute();
        int second = now.getSecond();
        DayOfWeek dayOfWeek = now.getDayOfWeek();
        System.out.println(now);
        System.out.println(years);
        System.out.println(nowMonthValue);
        System.out.println(dayOfMonth);
        System.out.println(dayOfWeek);
        System.out.println(hour);
        System.out.println(minute);
        System.out.println(second);
    }


    public static void main(String[] args) {
        b();
    }
}
